package com.tk.select;

public class Demo07 {
    public static void main(String[] args) {
        int a = 0;

        while (a <= 40) {
            System.out.print(a + " ");
            a += 2;
        }
        System.out.println("while循环结束");

        int m = 0;
        for (int i = 0; i <= 40; i++) {
            System.out.print(i + " ");
            m++;

        }
        System.out.println("for循环结束");
        System.out.println("循环次数：" + m);
    }
}
